import babel from 'rollup-plugin-babel'
const config = {
  input: './src/index.js',
  output: {
    file: './dist/x-rollup-package.js',
    format: 'umd', //  五种输出格式：amd /  es6 / iife / umd / cjs
    name: 'RollupPackage', //当format为iife和umd时必须提供，将作为全局变量挂在window(浏览器环境)下：window.A=...
    sourcemap: true //生成bundle.map.js文件，方便调试
  },
  plugins: [
    babel({
      exclude: 'node_modules/**',
    })
  ],
}
export default config
